package com.example.userservice.Constants;

public class RedisConstants {

    public static final String LOGIN_CODE_KEY = "login:code:";  //登录验证码
    public static final int CODE_EXPIRE_MINUTES = 2;          //验证码五分钟过去

    public static final String LOGIN_USER_KEY = "login:token:";   //登录token存储

    public static final String MODIFY_PHONE_CODE_KEY_PREFIX = "modify_phone_code:";  //存储新手机号和验证码的关联
    // 检查是否有正在进行的手机号修改操作（锁住，防止一个手机同时成为两个用户的绑定手机号）
    public static final String PHONE_MODIFICATION_LOCK_KEY = "phone_modify_lock:";
    public static final String NEW_PHONE_KEY_PREFIX = "new_phone:";

    public static final String OLD_PHONE_KEY_PREFIX = "old_phone";
    public static final long LOCK_EXPIRE_MINUTES = 10;

    public static final String RESET_PASSWORD_CODE_KEY_PREFIX = "reset_password_code:";  //忘记密码key
    public static final long RESET_PASSWORD_CODE_EXPIRE_MINUTES = 5;

    public static final String BING_PHONE_CODE_KEY_PREFIX = "bing_phone_code:";
    public static final long BING_PHONE_CODE_EXPIRE_MINUTES = 5;

    public static final long ACCESS_TOKEN_TTL = 3600000;   //短Token过期时间  一小时
    public static final long REFRESH_TOKEN_TTL = 2592000000L;    //长Token过期时间   30天


}
